//
//  CalculateTextHeight.m
//  PorjectA
//
//  Created by zhilianhe on 15/12/7.
//  Copyright © 2015年 zhilianhe. All rights reserved.
//

#import "CalculateTextHeight.h"
#define kwidthOfScreen  [[UIScreen mainScreen]bounds]
#define kWidth  [UIScreen mainScreen].bounds.size.width
#define kHeight [UIScreen mainScreen].bounds.size.height
@implementation CalculateTextHeight
+(CGFloat)giveNSString:(NSString *)nsstring andSizeOfLetter:(CGFloat)letter{
    CGRect rectLabel = [nsstring boundingRectWithSize:CGSizeMake(kWidth * 0.98, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:letter]} context:nil];
    CGFloat floatLabel = rectLabel.size.height;
    return floatLabel;
}
@end
